<template>

  <div class="person">
    <h2>name:{{ name }}</h2>
    <h2>age:{{ age }}</h2>
    <button @click="showTel" >联系方式</button>
  </div>

</template>

<script lang='ts'>
export default{
    name:'person',
    data(){
        return{
            name:'zhangsan',
            age:19,
            tel:'13800000001'
        }
    },
    methods: {
        showTel(){
            alert(this.tel);
        }
    },
}
</script>
<style scoped>
.person{
      background-color: skyblue;
      border-radius: 3px;
      padding: 5px;
      margin: 2px 5px 2px 5px;
  }
</style>